module.exports = app => {
  const { config } = app
  const { dict, constant } = config
  const { ORDER_STATE_AWAIT_PAY } = constant
  const { Schema, model, getModelName, formatDate, pre } = app.jax.mongoose
  const modelName = getModelName(__filename)

  const schema = new Schema({
    trackName: String,
    trackTitle: String,
    trackData: Schema.Types.Mixed,
    // startTime: Date,
    // endTime: Date,
    trackDate: Date, // 统计日期
    trackScope: String, // 统计范围
    total: Number, // 总数
    totalArray: Array, // 多天数据汇总
    dataType: Number, // 数据类型 0、总数 1、数组
  })

  const Model = model(modelName, schema)

  return Model
}
